﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using JM.JCY.Common;
using JM.JCY.DataAccess;
using JM.JCY.BusinessEntity;

namespace JM.JCY.BusinessComponent
{
  public  class ApplicationBC : JCYBusinessComponentBase<ApplicationDA>
    {
        public ApplicationBC()
            : base(new ApplicationDA())
        {
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationByName(string appName)
        {
            return this.DataAccess.GetApplicationByName(appName);
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationByType(string appType, string isVisble)
        {
            return this.DataAccess.GetApplicationByType(appType,isVisble);
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationNameById(int appId)
        {
            return this.DataAccess.GetApplicationNameById(appId);
        }




        public ApplicationDataSet.T_ApplicationRoleDataTable GetApplicationRoleByUserName(string userName)
        {
            return this.DataAccess.GetApplicationRoleByUserName(userName);
        }

        public ApplicationDataSet.T_ApplicationRoleDataTable GetApplicationRoleByAppId(int appId)
        {
            return this.DataAccess.GetApplicationRoleByAppId(appId);
        }

        public void DeleteApplicationRoleByAppId(int appId)
        {
            this.DataAccess.DeleteApplicationRoleByAppId(appId);
        }

        public void CreateApplicationRole(ApplicationDataSet.T_ApplicationRoleDataTable dt)
        {
            this.DataAccess.CreateApplicationRole(dt);
        }
    }
}
